/*     */ package net.sourceforge.appgen.model;
/*     */ 
/*     */ import java.io.File;
/*     */ import java.io.Serializable;
/*     */ import java.util.Properties;
/*     */ import net.sourceforge.appgen.connector.ProfileConnector;
/*     */ 
/*     */ public class ConnectionInformation extends ValueModifyModel
/*     */   implements Serializable
/*     */ {
/*     */   private static final long serialVersionUID = 1L;
/*     */   private String name;
/*     */   private String schema;
/*     */ 
/*     */   public File getDriverFile()
/*     */   {
/*  41 */     ProfileConnector profileConnector = new ProfileConnector(this);
/*     */ 
/*  43 */     Properties properties = profileConnector.getBaseProperties();
/*     */ 
/*  45 */     return new File(properties.getProperty("jarList"));
/*     */   }
/*     */ 
/*     */   public String getDriverClassName() {
/*  49 */     ProfileConnector profileConnector = new ProfileConnector(this);
/*     */ 
/*  51 */     Properties properties = profileConnector.getBaseProperties();
/*     */ 
/*  53 */     return properties.getProperty("org.eclipse.datatools.connectivity.db.driverClass");
/*     */   }
/*     */ 
/*     */   public String getUrl() {
/*  57 */     ProfileConnector profileConnector = new ProfileConnector(this);
/*     */ 
/*  59 */     Properties properties = profileConnector.getBaseProperties();
/*     */ 
/*  61 */     return properties.getProperty("org.eclipse.datatools.connectivity.db.URL");
/*     */   }
/*     */ 
/*     */   public String getUser() {
/*  65 */     ProfileConnector profileConnector = new ProfileConnector(this);
/*     */ 
/*  67 */     Properties properties = profileConnector.getBaseProperties();
/*     */ 
/*  69 */     return properties.getProperty("org.eclipse.datatools.connectivity.db.username");
/*     */   }
/*     */ 
/*     */   public String getPassword() {
/*  73 */     ProfileConnector profileConnector = new ProfileConnector(this);
/*     */ 
/*  75 */     Properties properties = profileConnector.getBaseProperties();
/*     */ 
/*  77 */     return properties.getProperty("org.eclipse.datatools.connectivity.db.password");
/*     */   }
/*     */ 
/*     */   public String getName() {
/*  81 */     return this.name;
/*     */   }
/*     */ 
/*     */   public void setName(String name) {
/*  85 */     this.name = name;
/*     */ 
/*  87 */     valueModified();
/*     */   }
/*     */ 
/*     */   public String getSchema() {
/*  91 */     return this.schema;
/*     */   }
/*     */ 
/*     */   public void setSchema(String schema) {
/*  95 */     this.schema = schema;
/*     */ 
/*  97 */     valueModified();
/*     */   }
/*     */ 
/*     */   public int hashCode()
/*     */   {
/* 103 */     int result = 1;
/* 104 */     result = 31 * result + (this.name == null ? 0 : this.name.hashCode());
/* 105 */     result = 31 * result + (this.schema == null ? 0 : this.schema.hashCode());
/* 106 */     return result;
/*     */   }
/*     */ 
/*     */   public boolean equals(Object obj)
/*     */   {
/* 111 */     if (this == obj)
/* 112 */       return true;
/* 113 */     if (obj == null)
/* 114 */       return false;
/* 115 */     if (getClass() != obj.getClass())
/* 116 */       return false;
/* 117 */     ConnectionInformation other = (ConnectionInformation)obj;
/* 118 */     if (this.name == null) {
/* 119 */       if (other.name != null)
/* 120 */         return false;
/* 121 */     } else if (!this.name.equals(other.name))
/* 122 */       return false;
/* 123 */     if (this.schema == null) {
/* 124 */       if (other.schema != null)
/* 125 */         return false;
/* 126 */     } else if (!this.schema.equals(other.schema))
/* 127 */       return false;
/* 128 */     return true;
/*     */   }
/*     */ 
/*     */   public String toString()
/*     */   {
/* 133 */     return "ConnectionInformation [name=" + this.name + ", schema=" + this.schema + "]";
/*     */   }
/*     */ }

/* Location:           C:\Users\lzl6066\Downloads\net.sourceforge.appgen_1.2.0\plugins\net.sourceforge.appgen_1.2.0.201002031718\
 * Qualified Name:     net.sourceforge.appgen.model.ConnectionInformation
 * JD-Core Version:    0.6.0
 */